//
//  cardStack.h
//  Testat_5
//
//  Created by Benno Lauther on 20.11.13.
//
//

#ifndef Testat_5_cardStack_h
#define Testat_5_cardStack_h

#include "coreDefines.h"
#include "validMove.h"


//
//  cardStack.c
//  Testat_5
//
//  Created by Benno Lauther on 20.11.13.
//
//
#include <stdio.h>
#include "cardStack.h"
#include "printCard.h"


int numberOfCardsInStack(int (*stack)[NR_CARDS]);
int addCardToStack(int (*stack)[NR_CARDS],int cardToAdd);
int removeCardAtPositionFromStack(int (*stack)[NR_CARDS], int positionToRemove);
int removeTopCardFromStack(int (*stack)[NR_CARDS]);
int removeCardFromStack(int (*stack)[NR_CARDS], int cardToRemove);
void initStack(int (*stack)[NR_CARDS]);
int findValidMove(int (*stack)[NR_CARDS],int openCar, int* colorWish);
int peekTopCardOfStack(int (*stack)[NR_CARDS]);
void printCardStack(int (*stack)[NR_CARDS]);
int getDominantColorOfstack( int (*stack)[NR_CARDS]);
int recyclePlayedCards(int (*stack)[NR_CARDS], int (*playedCards)[NR_CARDS]);
int stackIsEmpty(int (*stack)[NR_CARDS]);
int stackContainsEnoughCardsForNextTurn(int (*stack) [NR_CARDS]);
void sortPlayersHand(int (*stack)[NR_CARDS]);

#endif
